package com.example.a2209_mianshi.ui.mall.repository

import android.util.Log
import com.example.a2209_mianshi.http.ClubService
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject
const val TAG = "MallRepository"
class MallRepository @Inject constructor(private val clubService: ClubService){
    fun cmallMallGroup() = flow{
        emit(clubService.getMallGroupList())
        Log.d(TAG, "cmallMallGroup: 提交请求")
    }.flowOn(Dispatchers.IO)
    fun cmallBannerInfo() = flow{
        emit(clubService.getMallBannerInfo())
        Log.d(TAG, "cmallBannerInfo: 提交请求")
    }.flowOn(Dispatchers.IO)
}